package com.ml.framework.core.startup;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * 系统相关配置启动前，先初始一下自己的资源，方便后面的整合
 * 
 * @filename      : MLContextLoaderListener.java
 * @description   : TODO(一句话描述该类做什么)
 * @author        : wanghongkai
 * @create        : 2013-9-6 下午4:27:14
 * @copyright     : ML Corporation 2013
 *
 * Modification History:
 * Date             Author       Version
 * --------------------------------------
 * 2013-9-6 下午4:27:14
 */
public class MLContextLoaderListener implements ServletContextListener {

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		AppContext.initAppContext(sce.getServletContext());
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		AppContext.destoryAppContext();
	}

}
